#ifndef _NETSER_H_
#define _NETSER_H_

#include <cstring>
#include <iostream>
#include <thread>

class netser {
private:
  int fd;
  int outport;
  bool running = false;
  std::thread handle;
  std::string outip;

public:
  netser(std::string outip, int port);
  ~netser();
  int send(char *buf, size_t len, struct sockaddr_in *addr);
  int start();
  int stop();
  void thread();
};

#endif // _NETSER_H_
